const Router = require("koa-router");
import user from "../controller/user.js";
import {
  delDataController,
  insertDataController,
  getDataController
} from "../controller/api.js";
import { testController } from "../controller/test.js";
const router = new Router({
  prefix: "" // 添加前缀
});

router.post("/login", user.login);
router.post("/delete", delDataController);
router.get("/deleteAll", delDataController);
router.post("/insert", insertDataController);
router.get("/getData", getDataController);
router.get("/", getDataController);

router.post("/profile", user.profile);

// 测试代码
router.get("/test", testController);

module.exports = router;
